************************************************************************************
********  Lowess curves of longitudinal development across member states  **********
************************************************************************************
twoway (lowess EUsupport_int Year if LR_3cat==1) (lowess EUsupport_int Year if LR_3cat==2) (lowess EUsupport_int Year if LR_3cat==3), by(country) graphregion(fcolor(white)) legend(cols(2) order(1 "Left-wing" 2 "Center" 3 "Right-wing")) xtitle("Left-right spectrum")


gen weight=.
replace weight=weight_eu28 if weight==.
replace weight=weight_eu27 if weight==.
replace weight=weight_eu25 if weight==.
replace weight=weight_eu15 if weight==.
replace weight=weight_eu12 if weight==.
replace weight=weight_eu10 if weight==.
replace weight=weight_eu9 if weight==.
replace weight=weight_eu6 if weight==.

gen timevar=(Exceldate-26665)/365.25

gen Welfare_Model=1 if country==1 | country==2 | country==3 | country==4 | country==6 | country==15
replace Welfare_Model=2 if country==8 | country==9
replace Welfare_Model=3 if country==5 | country==10 | country==11 | country==12 | country==16 | country==22
replace Welfare_Model=4 if country==7 | country==13 | country==14 
replace Welfare_Model=5 if country==17 | country==18 | country==19 | country==20 | country==21 | country==23 | country==24 | country==25 | country==26 | country==27 | country==28

gen Euroscepticism=.
replace Euroscepticism=0 if MEM_ATT_cat3==1
replace Euroscepticism=1 if MEM_ATT_cat3==2
replace Euroscepticism=1 if MEM_ATT_cat3==3
************************************************************************************
************************************************************************************
********** MARGINAL EFFECTS OF POSITIONING RIGHT ON EU SUPPORT *********************
************************************************************************************
************************************************************************************

************** Continental
logit Euroscepticism c.timevar##c.timevar##c.lr_scale demo_female demo_age demo_education_cat3 demo_commtype [pweight=weight] if Welfare_Model==1
	quietly margins [pweight=weight], dydx(lr_scale) at(timevar=(0(1)47))
	marginsplot, recast(line) recastci(rarea) name(margins1, replace) title("Continental Conservative member states") ytitle("Average marginal effect on Euroscepticism")
************** Liberal
logit Euroscepticism c.timevar##c.timevar##c.lr_scale demo_female demo_age demo_education_cat3 demo_commtype [pweight=weight] if Welfare_Model==2
	quietly margins, dydx(lr_scale) at(timevar=(0(1)47))
	marginsplot, recast(line) recastci(rarea) name(margins2, replace) title("Anglo-Saxon Liberal member states")
************** Mediterranean
logit Euroscepticism c.timevar##c.timevar##c.lr_scale demo_female demo_age demo_education_cat3 demo_commtype [pweight=weight] if Welfare_Model==3
	quietly margins, dydx(lr_scale) at(timevar=(13(1)47))
	marginsplot, recast(line) recastci(rarea) name(margins4, replace) title("Mediterranean Conservative member states")
************** Nordic
logit Euroscepticism c.timevar##c.timevar##c.lr_scale demo_female demo_age demo_education_cat3 demo_commtype [pweight=weight] if Welfare_Model==4
	quietly margins, dydx(lr_scale) at(timevar=(22(1)47))
	marginsplot, recast(line) recastci(rarea) name(margins3, replace) title("Nordic Universal member states")  ytitle("Average marginal effect on Euroscepticism")
************** Post-socialist
logit Euroscepticism c.timevar##c.timevar##c.lr_scale demo_female demo_age demo_education_cat3 demo_commtype [pweight=weight] if Welfare_Model==5
	quietly margins, dydx(lr_scale) at(timevar=(31(1)47))
	marginsplot, recast(line) recastci(rarea) name(margins5, replace) title("Eastern Post-socialist member states")


************************************************************************************
************************************************************************************
************ Relationship between Euroscepticism & lr_scale ************************
************************************************************************************
************************************************************************************
gen Euroscepticism=(EUsupport*-1)+1
************** Continental 1973-2019
twoway (qfitci Euroscepticism lr_scale if Welfare_Model==1 & Year<=1982 [pweight=weight]) ///
(qfitci Euroscepticism lr_scale if Welfare_Model==1 & Year>=1983 & Year<=1991 [pweight=weight]) ///
(qfitci Euroscepticism lr_scale if Welfare_Model==1 & Year>=1992 & Year<=2000 [pweight=weight]) ///
(qfitci Euroscepticism lr_scale if Welfare_Model==1 & Year>=2001 & Year<=2010 [pweight=weight]) ///
(qfitci Euroscepticism lr_scale if Welfare_Model==1 & Year>=2011 [pweight=weight]), legend(order(2 "1973-1982" 3 "1983-1991" 4 "1992-2000" 5 "2001-2010" 6 "2011-2019")) ylabel(0.2(0.2)1) xlabel(1(1)10) title("Continental Conservative member states") ytitle("Euroscepticism")

************** Liberal 1973-2019
twoway (qfitci Euroscepticism lr_scale if Welfare_Model==2 & Year<=1982 [pweight=weight]) ///
(qfitci Euroscepticism lr_scale if Welfare_Model==2 & Year>=1983 & Year<=1991 [pweight=weight]) ///
(qfitci Euroscepticism lr_scale if Welfare_Model==2 & Year>=1992 & Year<=2000 [pweight=weight]) ///
(qfitci Euroscepticism lr_scale if Welfare_Model==2 & Year>=2001 & Year<=2010 [pweight=weight]) ///
(qfitci Euroscepticism lr_scale if Welfare_Model==2 & Year>=2011 [pweight=weight]), legend(order(2 "1973-1982" 3 "1983-1991" 4 "1992-2000" 5 "2001-2010" 6 "2011-2019")) ylabel(0.2(0.2)1) xlabel(1(1)10) title("Anglo-Saxon Liberal member states")

************** Mediterranean 1986-2019
twoway (qfitci Euroscepticism lr_scale if Welfare_Model==3 & Year>=1986 & Year<=1991 [pweight=weight]) ///
(qfitci Euroscepticism lr_scale if Welfare_Model==3 & Year>=1992 & Year<=2000 [pweight=weight]) ///
(qfitci Euroscepticism lr_scale if Welfare_Model==3 & Year>=2001 & Year<=2010 [pweight=weight]) ///
(qfitci Euroscepticism lr_scale if Welfare_Model==3 & Year>=2011 [pweight=weight]), legend(order(2 "1983-1991" 3 "1992-2000" 4 "2001-2010" 5 "2011-2019")) ylabel(0.2(0.2)1) xlabel(1(1)10) title("Mediterranean Conservative member states")

************** Nordic 1995-2019
twoway (qfitci Euroscepticism lr_scale if Welfare_Model==4 & Year>=1995 & Year<=2000 [pweight=weight]) ///
(qfitci Euroscepticism lr_scale if Welfare_Model==4 & Year>=2001 & Year<=2010 [pweight=weight]) ///
(qfitci Euroscepticism lr_scale if Welfare_Model==4 & Year>=2011 [pweight=weight]), legend(order(2 "1992-2000" 3 "2001-2010" 4 "2011-2019")) ylabel(0.2(0.2)1) xlabel(1(1)10) title("Nordic Universal member states")  ytitle("Euroscepticism")

************** Post-socialist 2004-2019
twoway (qfitci Euroscepticism lr_scale if Welfare_Model==5 & Year>=2001 & Year<=2010 [pweight=weight]) ///
(qfitci Euroscepticism lr_scale if Welfare_Model==5 & Year>=2011 [pweight=weight]), legend(order(2 "2001-2010" 3 "2011-2019")) ylabel(0.2(0.2)1) xlabel(1(1)10) title("Eastern Post-socialist member states")



************************************************************************************
************************************************************************************
****************************       APPENDIX         ********************************
************************************************************************************
************************************************************************************

************** MARGINAL EFFECTS OF POSITIONING RIGHT ON EU SUPPORT *****************
************** Continental
*1. France
quietly logit Euroscepticism c.timevar##c.timevar##c.lr_scale demo_female demo_age demo_education_cat3 demo_commtype [pweight=weight] if country==1
	quietly margins [pweight=weight], dydx(lr_scale) at(timevar=(0(1)47))
	marginsplot, recast(line) recastci(rarea) name(margins1, replace) title("France") ytitle("Euroscepticism")
	graph save France_new
*2. Belgium
quietly logit Euroscepticism c.timevar##c.timevar##c.lr_scale demo_female demo_age demo_education_cat3 demo_commtype [pweight=weight] if country==2
	quietly margins [pweight=weight], dydx(lr_scale) at(timevar=(0(1)47))
	marginsplot, recast(line) recastci(rarea) name(margins1, replace) title("Belgium") ytitle("Euroscepticism")
	graph save Belgium_new
*3. Netherlands
quietly logit Euroscepticism c.timevar##c.timevar##c.lr_scale demo_female demo_age demo_education_cat3 demo_commtype [pweight=weight] if country==3
	quietly margins [pweight=weight], dydx(lr_scale) at(timevar=(0(1)47))
	marginsplot, recast(line) recastci(rarea) name(margins1, replace) title("The Netherlands") ytitle("Euroscepticism")
	graph save Netherlands_new
*4. Germany
quietly logit Euroscepticism c.timevar##c.timevar##c.lr_scale demo_female demo_age demo_education_cat3 demo_commtype [pweight=weight] if country==4
	quietly margins [pweight=weight], dydx(lr_scale) at(timevar=(0(1)47))
	marginsplot, recast(line) recastci(rarea) name(margins1, replace) title("Germany") ytitle("Euroscepticism")
	graph save Germany_new
*6. Luxembourg
quietly logit Euroscepticism c.timevar##c.timevar##c.lr_scale demo_female demo_age demo_education_cat3 demo_commtype [pweight=weight] if country==6
	quietly margins [pweight=weight], dydx(lr_scale) at(timevar=(0(1)47))
	marginsplot, recast(line) recastci(rarea) name(margins1, replace) title("Luxembourg") ytitle("Euroscepticism")
	graph save Luxembourg_new
*15. Austria
quietly logit Euroscepticism c.timevar##c.timevar##c.lr_scale demo_female demo_age demo_education_cat3 demo_commtype [pweight=weight] if country==15
	quietly margins [pweight=weight], dydx(lr_scale) at(timevar=(22(1)47))
	marginsplot, recast(line) recastci(rarea) name(margins1, replace) title("Austria") ytitle("Euroscepticism")
	graph save Austria_new
************** Liberal
*8. Great Brittain
quietly logit Euroscepticism c.timevar##c.timevar##c.lr_scale demo_female demo_age demo_education_cat3 demo_commtype [pweight=weight] if country==9
	quietly margins [pweight=weight], dydx(lr_scale) at(timevar=(0(1)47))
	marginsplot, recast(line) recastci(rarea) name(margins1, replace) title("United Kingdom") ytitle("Euroscepticism")
	graph save United_Kingdom_new
*9. Ireland
quietly logit Euroscepticism c.timevar##c.timevar##c.lr_scale demo_female demo_age demo_education_cat3 demo_commtype [pweight=weight] if country==8
	quietly margins [pweight=weight], dydx(lr_scale) at(timevar=(0(1)47))
	marginsplot, recast(line) recastci(rarea) name(margins1, replace) title("Ireland") ytitle("Euroscepticism")
	graph save Ireland_new
************** Mediterranean
*5. Italy
quietly logit Euroscepticism c.timevar##c.timevar##c.lr_scale demo_female demo_age demo_education_cat3 demo_commtype [pweight=weight] if country==5
	quietly margins [pweight=weight], dydx(lr_scale) at(timevar=(0(1)47))
	marginsplot, recast(line) recastci(rarea) name(margins1, replace) title("Italy") ytitle("Euroscepticism")
	graph save Italy_new
*10. Greece
quietly logit Euroscepticism c.timevar##c.timevar##c.lr_scale demo_female demo_age demo_education_cat3 demo_commtype [pweight=weight] if country==10
	quietly margins [pweight=weight], dydx(lr_scale) at(timevar=(8(1)47))
	marginsplot, recast(line) recastci(rarea) name(margins1, replace) title("Greece") ytitle("Euroscepticism")
	graph save Greece_new
*11. Spain
quietly logit Euroscepticism c.timevar##c.timevar##c.lr_scale demo_female demo_age demo_education_cat3 demo_commtype [pweight=weight] if country==11
	quietly margins [pweight=weight], dydx(lr_scale) at(timevar=(13(1)47))
	marginsplot, recast(line) recastci(rarea) name(margins1, replace) title("Spain") ytitle("Euroscepticism")
	graph save Spain_new
*12. Portugal
quietly logit Euroscepticism c.timevar##c.timevar##c.lr_scale demo_female demo_age demo_education_cat3 demo_commtype [pweight=weight] if country==12
	quietly margins [pweight=weight], dydx(lr_scale) at(timevar=(13(1)47))
	marginsplot, recast(line) recastci(rarea) name(margins1, replace) title("Portugal") ytitle("Euroscepticism")
	graph save Portugal_new
*22. Malta
quietly logit Euroscepticism c.timevar##c.timevar##c.lr_scale demo_female demo_age demo_education_cat3 demo_commtype [pweight=weight] if country==22
	quietly margins [pweight=weight], dydx(lr_scale) at(timevar=(31(1)47))
	marginsplot, recast(line) recastci(rarea) name(margins1, replace) title("Malta") ytitle("Euroscepticism")
	graph save Malta_new
*16. Cyprus
quietly logit Euroscepticism c.timevar##c.timevar##c.lr_scale demo_female demo_age demo_education_cat3 demo_commtype [pweight=weight] if country==16
	quietly margins [pweight=weight], dydx(lr_scale) at(timevar=(31(1)47))
	marginsplot, recast(line) recastci(rarea) name(margins1, replace) title("Cyprus") ytitle("Euroscepticism")
	graph save Cyprus_new
************** Nordic
*7. Denmark
quietly logit Euroscepticism c.timevar##c.timevar##c.lr_scale demo_female demo_age demo_education_cat3 demo_commtype [pweight=weight] if country==7
	quietly margins [pweight=weight], dydx(lr_scale) at(timevar=(0(1)47))
	marginsplot, recast(line) recastci(rarea) name(margins1, replace) title("Denmark") ytitle("Euroscepticism")
	graph save Denmark_new
*13 Sweden
quietly logit Euroscepticism c.timevar##c.timevar##c.lr_scale demo_female demo_age demo_education_cat3 demo_commtype [pweight=weight] if country==14
	quietly margins [pweight=weight], dydx(lr_scale) at(timevar=(20(1)47))
	marginsplot, recast(line) recastci(rarea) name(margins1, replace) title("Sweden") ytitle("Euroscepticism")
	graph save Sweden_new
*14. Finland
quietly logit Euroscepticism c.timevar##c.timevar##c.lr_scale demo_female demo_age demo_education_cat3 demo_commtype [pweight=weight] if country==13
	quietly margins [pweight=weight], dydx(lr_scale) at(timevar=(22(1)47))
	marginsplot, recast(line) recastci(rarea) name(margins1, replace) title("Finland") ytitle("Euroscepticism")
	graph save Finland_new
************** Post-socialist
*17. Czech Republic
quietly logit Euroscepticism c.timevar##c.timevar##c.lr_scale demo_female demo_age demo_education_cat3 demo_commtype [pweight=weight] if country==17
	quietly margins [pweight=weight], dydx(lr_scale) at(timevar=(31(1)47))
	marginsplot, recast(line) recastci(rarea) name(margins1, replace) title("Czech Republic") ytitle("Euroscepticism")
	graph save Czech_Republic_new
*18. Estonia
quietly logit Euroscepticism c.timevar##c.timevar##c.lr_scale demo_female demo_age demo_education_cat3 demo_commtype [pweight=weight] if country==18
	quietly margins [pweight=weight], dydx(lr_scale) at(timevar=(31(1)47))
	marginsplot, recast(line) recastci(rarea) name(margins1, replace) title("Estonia") ytitle("Euroscepticism")
	graph save Estonia_new
*19. Hungary
quietly logit Euroscepticism c.timevar##c.timevar##c.lr_scale demo_female demo_age demo_education_cat3 demo_commtype [pweight=weight] if country==19
	quietly margins [pweight=weight], dydx(lr_scale) at(timevar=(31(1)47))
	marginsplot, recast(line) recastci(rarea) name(margins1, replace) title("Hungary") ytitle("Euroscepticism")
	graph save Hungary_new
*20. Latvia
quietly logit Euroscepticism c.timevar##c.timevar##c.lr_scale demo_female demo_age demo_education_cat3 demo_commtype [pweight=weight] if country==20
	quietly margins [pweight=weight], dydx(lr_scale) at(timevar=(31(1)47))
	marginsplot, recast(line) recastci(rarea) name(margins1, replace) title("Latvia") ytitle("Euroscepticism")
	graph save Latvia
*21. Lithuania
quietly logit Euroscepticism c.timevar##c.timevar##c.lr_scale demo_female demo_age demo_education_cat3 demo_commtype [pweight=weight] if country==21
	quietly margins [pweight=weight], dydx(lr_scale) at(timevar=(31(1)47))
	marginsplot, recast(line) recastci(rarea) name(margins1, replace) title("Lithuania") ytitle("Euroscepticism")
	graph save Lithuania_new
*23. Poland
quietly logit Euroscepticism c.timevar##c.timevar##c.lr_scale demo_female demo_age demo_education_cat3 demo_commtype [pweight=weight] if country==23
	quietly margins [pweight=weight], dydx(lr_scale) at(timevar=(31(1)47))
	marginsplot, recast(line) recastci(rarea) name(margins1, replace) title("Poland") ytitle("Euroscepticism")
	graph save Poland_new
*24. Slovakia
quietly logit Euroscepticism c.timevar##c.timevar##c.lr_scale demo_female demo_age demo_education_cat3 demo_commtype [pweight=weight] if country==24
	quietly margins [pweight=weight], dydx(lr_scale) at(timevar=(31(1)47))
	marginsplot, recast(line) recastci(rarea) name(margins1, replace) title("Slovakia") ytitle("Euroscepticism")
	graph save Slovakia_new
*25. Slovenia
quietly logit Euroscepticism c.timevar##c.timevar##c.lr_scale demo_female demo_age demo_education_cat3 demo_commtype [pweight=weight] if country==25
	quietly margins [pweight=weight], dydx(lr_scale) at(timevar=(31(1)47))
	marginsplot, recast(line) recastci(rarea) name(margins1, replace) title("Slovenia") ytitle("Euroscepticism")
	graph save Slovenia_new
*26. Bulgaria
quietly logit Euroscepticism c.timevar##c.timevar##c.lr_scale demo_female demo_age demo_education_cat3 demo_commtype [pweight=weight] if country==26
	quietly margins [pweight=weight], dydx(lr_scale) at(timevar=(34(1)47))
	marginsplot, recast(line) recastci(rarea) name(margins1, replace) title("Bulgaria") ytitle("Euroscepticism")
	graph save Bulgaria_new
*27. Romania
quietly logit Euroscepticism c.timevar##c.timevar##c.lr_scale demo_female demo_age demo_education_cat3 demo_commtype [pweight=weight] if country==27
	quietly margins [pweight=weight], dydx(lr_scale) at(timevar=(34(1)47))
	marginsplot, recast(line) recastci(rarea) name(margins1, replace) title("Romania") ytitle("Euroscepticism")
	graph save Romania_new
*28. Croatia
quietly logit Euroscepticism c.timevar##c.timevar##c.lr_scale demo_female demo_age demo_education_cat3 demo_commtype [pweight=weight] if country==28
	quietly margins [pweight=weight], dydx(lr_scale) at(timevar=(40(1)47))
	marginsplot, recast(line) recastci(rarea) name(margins1, replace) title("Croatia") ytitle("Euroscepticism")
	graph save Croatia_new

	*** LABEL ***
quietly logit Euroscepticism c.Year##c.Year##c.lr_scale demo_female demo_age demo_education_cat3 demo_commtype [pweight=weight] if country==6
	quietly margins [pweight=weight], dydx(lr_scale) at(Year=(1973(5)2019))
	marginsplot, recast(line) recastci(rarea) name(margins1, replace) title("LABEL") ytitle("Euroscepticism")
	graph save LABEL_new, replace
	
twoway (lfit Euroscepticism Year if country==6)
	
************ Relationship between Euroscepticism & lr_scale ************************
************** Continental
*1. France
twoway (qfitci Euroscepticism lr_scale if country==1 & Year<=1982 [pweight=weight]) ///
(qfitci Euroscepticism lr_scale if country==1 & Year>=1983 & Year<=1991 [pweight=weight]) ///
(qfitci Euroscepticism lr_scale if country==1 & Year>=1992 & Year<=2000 [pweight=weight]) ///
(qfitci Euroscepticism lr_scale if country==1 & Year>=2001 & Year<=2010 [pweight=weight]) ///
(qfitci Euroscepticism lr_scale if country==1 & Year>=2011 [pweight=weight]), legend(order(2 "1973-1982" 3 "1983-1991" 4 "1992-2000" 5 "2001-2010" 6 "2011-2019")) ylabel(0.2(0.2)1) xlabel(1(1)10) title("France") ytitle("Euroscepticism")
graph save France_new2
*2. Belgium
twoway (qfitci Euroscepticism lr_scale if country==2 & Year<=1982 [pweight=weight]) ///
(qfitci Euroscepticism lr_scale if country==2 & Year>=1983 & Year<=1991 [pweight=weight]) ///
(qfitci Euroscepticism lr_scale if country==2 & Year>=1992 & Year<=2000 [pweight=weight]) ///
(qfitci Euroscepticism lr_scale if country==2 & Year>=2001 & Year<=2010 [pweight=weight]) ///
(qfitci Euroscepticism lr_scale if country==2 & Year>=2011 [pweight=weight]), legend(order(2 "1973-1982" 3 "1983-1991" 4 "1992-2000" 5 "2001-2010" 6 "2011-2019")) ylabel(0.2(0.2)1) xlabel(1(1)10) title("Belgium") ytitle("Euroscepticism")
graph save Belgium_new2
*3. Netherlands
twoway (qfitci Euroscepticism lr_scale if country==3 & Year<=1982 [pweight=weight]) ///
(qfitci Euroscepticism lr_scale if country==3 & Year>=1983 & Year<=1991 [pweight=weight]) ///
(qfitci Euroscepticism lr_scale if country==3 & Year>=1992 & Year<=2000 [pweight=weight]) ///
(qfitci Euroscepticism lr_scale if country==3 & Year>=2001 & Year<=2010 [pweight=weight]) ///
(qfitci Euroscepticism lr_scale if country==3 & Year>=2011 [pweight=weight]), legend(order(2 "1973-1982" 3 "1983-1991" 4 "1992-2000" 5 "2001-2010" 6 "2011-2019")) ylabel(0.2(0.2)1) xlabel(1(1)10) title("Netherlands") ytitle("Euroscepticism")
graph save Netherlands_new2
*4. Germany
twoway (qfitci Euroscepticism lr_scale if country==4 & Year<=1982 [pweight=weight]) ///
(qfitci Euroscepticism lr_scale if country==4 & Year>=1983 & Year<=1991 [pweight=weight]) ///
(qfitci Euroscepticism lr_scale if country==4 & Year>=1992 & Year<=2000 [pweight=weight]) ///
(qfitci Euroscepticism lr_scale if country==4 & Year>=2001 & Year<=2010 [pweight=weight]) ///
(qfitci Euroscepticism lr_scale if country==4 & Year>=2011 [pweight=weight]), legend(order(2 "1973-1982" 3 "1983-1991" 4 "1992-2000" 5 "2001-2010" 6 "2011-2019")) ylabel(0.2(0.2)1) xlabel(1(1)10) title("Germany") ytitle("Euroscepticism")
graph save Germany_new2
*6. Luxembourg
twoway (qfitci Euroscepticism lr_scale if country==6 & Year<=1982 [pweight=weight]) ///
(qfitci Euroscepticism lr_scale if country==6 & Year>=1983 & Year<=1991 [pweight=weight]) ///
(qfitci Euroscepticism lr_scale if country==6 & Year>=1992 & Year<=2000 [pweight=weight]) ///
(qfitci Euroscepticism lr_scale if country==6 & Year>=2001 & Year<=2010 [pweight=weight]) ///
(qfitci Euroscepticism lr_scale if country==6 & Year>=2011 [pweight=weight]), legend(order(2 "1973-1982" 3 "1983-1991" 4 "1992-2000" 5 "2001-2010" 6 "2011-2019")) ylabel(0.2(0.2)1) xlabel(1(1)10) title("Luxembourg") ytitle("Euroscepticism")
graph save Luxembourg_new2
*15. Austria
twoway (qfitci Euroscepticism lr_scale if country==15 & Year>=1992 & Year<=2000 [pweight=weight]) ///
(qfitci Euroscepticism lr_scale if country==15 & Year>=2001 & Year<=2010 [pweight=weight]) ///
(qfitci Euroscepticism lr_scale if country==15 & Year>=2011 [pweight=weight]), legend(order(2 "1992-2000" 3 "2001-2010" 4 "2011-2019")) ylabel(0.2(0.2)1) xlabel(1(1)10) title("Austria") ytitle("Euroscepticism")
graph save Austria_new2
************** Liberal
*8. Ireland
twoway (qfitci Euroscepticism lr_scale if country==8 & Year<=1982 [pweight=weight]) ///
(qfitci Euroscepticism lr_scale if country==8 & Year>=1983 & Year<=1991 [pweight=weight]) ///
(qfitci Euroscepticism lr_scale if country==8 & Year>=1992 & Year<=2000 [pweight=weight]) ///
(qfitci Euroscepticism lr_scale if country==8 & Year>=2001 & Year<=2010 [pweight=weight]) ///
(qfitci Euroscepticism lr_scale if country==8 & Year>=2011 [pweight=weight]), legend(order(2 "1973-1982" 3 "1983-1991" 4 "1992-2000" 5 "2001-2010" 6 "2011-2019")) ylabel(0.2(0.2)1) xlabel(1(1)10) title("Ireland") ytitle("Euroscepticism")
graph save ireland_new2
*9. United Kingdom
twoway (qfitci Euroscepticism lr_scale if country==9 & Year<=1982 [pweight=weight]) ///
(qfitci Euroscepticism lr_scale if country==9 & Year>=1983 & Year<=1991 [pweight=weight]) ///
(qfitci Euroscepticism lr_scale if country==9 & Year>=1992 & Year<=2000 [pweight=weight]) ///
(qfitci Euroscepticism lr_scale if country==9 & Year>=2001 & Year<=2010 [pweight=weight]) ///
(qfitci Euroscepticism lr_scale if country==9 & Year>=2011 [pweight=weight]), legend(order(2 "1973-1982" 3 "1983-1991" 4 "1992-2000" 5 "2001-2010" 6 "2011-2019")) ylabel(0.2(0.2)1) xlabel(1(1)10) title("United Kingdom") ytitle("Euroscepticism")
graph save United_Kingdom_new2
************** Mediterranean
*5. Italy
twoway (qfitci Euroscepticism lr_scale if country==5 & Year<=1982 [pweight=weight]) ///
(qfitci Euroscepticism lr_scale if country==5 & Year>=1983 & Year<=1991 [pweight=weight]) ///
(qfitci Euroscepticism lr_scale if country==5 & Year>=1992 & Year<=2000 [pweight=weight]) ///
(qfitci Euroscepticism lr_scale if country==5 & Year>=2001 & Year<=2010 [pweight=weight]) ///
(qfitci Euroscepticism lr_scale if country==5 & Year>=2011 [pweight=weight]), legend(order(2 "1973-1982" 3 "1983-1991" 4 "1992-2000" 5 "2001-2010" 6 "2011-2019")) ylabel(0.2(0.2)1) xlabel(1(1)10) title("Italy") ytitle("Euroscepticism")
graph save Italy_new2
*10. Greece
twoway (qfitci Euroscepticism lr_scale if country==10 & Year>=1983 & Year<=1991 [pweight=weight]) ///
(qfitci Euroscepticism lr_scale if country==10 & Year>=1992 & Year<=2000 [pweight=weight]) ///
(qfitci Euroscepticism lr_scale if country==10 & Year>=2001 & Year<=2010 [pweight=weight]) ///
(qfitci Euroscepticism lr_scale if country==10 & Year>=2011 [pweight=weight]), legend(order(2 "1983-1991" 3 "1992-2000" 4 "2001-2010" 5 "2011-2019")) ylabel(0.2(0.2)1) xlabel(1(1)10) title("Greece") ytitle("Euroscepticism")
graph save Greece_new2
*11. Spain
twoway (qfitci Euroscepticism lr_scale if country==11 & Year>=1983 & Year<=1991 [pweight=weight]) ///
(qfitci Euroscepticism lr_scale if country==11 & Year>=1992 & Year<=2000 [pweight=weight]) ///
(qfitci Euroscepticism lr_scale if country==11 & Year>=2001 & Year<=2010 [pweight=weight]) ///
(qfitci Euroscepticism lr_scale if country==11 & Year>=2011 [pweight=weight]), legend(order(2 "1983-1991" 3 "1992-2000" 4 "2001-2010" 5 "2011-2019")) ylabel(0.2(0.2)1) xlabel(1(1)10) title("Spain") ytitle("Euroscepticism")
graph save Spain_new2
*12. Portugal
twoway (qfitci Euroscepticism lr_scale if country==12 & Year>=1983 & Year<=1991 [pweight=weight]) ///
(qfitci Euroscepticism lr_scale if country==12 & Year>=1992 & Year<=2000 [pweight=weight]) ///
(qfitci Euroscepticism lr_scale if country==12 & Year>=2001 & Year<=2010 [pweight=weight]) ///
(qfitci Euroscepticism lr_scale if country==12 & Year>=2011 [pweight=weight]), legend(order(2 "1983-1991" 3 "1992-2000" 4 "2001-2010" 5 "2011-2019")) ylabel(0.2(0.2)1) xlabel(1(1)10) title("Portugal") ytitle("Euroscepticism")
graph save Portugal_new2
*22. Malta
twoway (qfitci Euroscepticism lr_scale if country==22 & Year>=2001 & Year<=2010 [pweight=weight]) ///
(qfitci Euroscepticism lr_scale if country==22 & Year>=2011 [pweight=weight]), legend(order(2 "2001-2010" 3 "2011-2019")) ylabel(0.2(0.2)1) xlabel(1(1)10) title("Malta") ytitle("Euroscepticism")
graph save Malta_new2
*16. Cyprus
twoway (qfitci Euroscepticism lr_scale if country==16 & Year>=2001 & Year<=2010 [pweight=weight]) ///
(qfitci Euroscepticism lr_scale if country==16 & Year>=2011 [pweight=weight]), legend(order(2 "2001-2010" 3 "2011-2019")) ylabel(0.2(0.2)1) xlabel(1(1)10) title("Cyprus") ytitle("Euroscepticism")
graph save Cyprus_new2
************** Nordic
*7. Denmark
twoway (qfitci Euroscepticism lr_scale if country==7 & Year<=1982 [pweight=weight]) ///
(qfitci Euroscepticism lr_scale if country==7 & Year>=1983 & Year<=1991 [pweight=weight]) ///
(qfitci Euroscepticism lr_scale if country==7 & Year>=1992 & Year<=2000 [pweight=weight]) ///
(qfitci Euroscepticism lr_scale if country==7 & Year>=2001 & Year<=2010 [pweight=weight]) ///
(qfitci Euroscepticism lr_scale if country==7 & Year>=2011 [pweight=weight]), legend(order(2 "1973-1982" 3 "1983-1991" 4 "1992-2000" 5 "2001-2010" 6 "2011-2019")) ylabel(0.2(0.2)1) xlabel(1(1)10) title("Denmark") ytitle("Euroscepticism")
graph save Denmark_new2
*13 Sweden
twoway (qfitci Euroscepticism lr_scale if country==14 & Year>=1992 & Year<=2000 [pweight=weight]) ///
(qfitci Euroscepticism lr_scale if country==14 & Year>=2001 & Year<=2010 [pweight=weight]) ///
(qfitci Euroscepticism lr_scale if country==14 & Year>=2011 [pweight=weight]), legend(order(2 "1992-2000" 3 "2001-2010" 4 "2011-2019")) ylabel(0.2(0.2)1) xlabel(1(1)10) title("Sweden") ytitle("Euroscepticism")
graph save Sweden_new2
*14. Finland
twoway (qfitci Euroscepticism lr_scale if country==13 & Year>=1992 & Year<=2000 [pweight=weight]) ///
(qfitci Euroscepticism lr_scale if country==13 & Year>=2001 & Year<=2010 [pweight=weight]) ///
(qfitci Euroscepticism lr_scale if country==13 & Year>=2011 [pweight=weight]), legend(order(2 "1992-2000" 3 "2001-2010" 4 "2011-2019")) ylabel(0.2(0.2)1) xlabel(1(1)10) title("Finland") ytitle("Euroscepticism")
graph save Finland_new2
************** Post-socialist
*17. Czech Republic
twoway (qfitci Euroscepticism lr_scale if country==17 & Year>=2001 & Year<=2010 [pweight=weight]) ///
(qfitci Euroscepticism lr_scale if country==17 & Year>=2011 [pweight=weight]), legend(order(2 "2001-2010" 3 "2011-2019")) ylabel(0.2(0.2)1) xlabel(1(1)10) title("Czech Republic") ytitle("Euroscepticism")
graph save Czech_Republic_new2
*18. Estonia
twoway (qfitci Euroscepticism lr_scale if country==18 & Year>=2001 & Year<=2010 [pweight=weight]) ///
(qfitci Euroscepticism lr_scale if country==18 & Year>=2011 [pweight=weight]), legend(order(2 "2001-2010" 3 "2011-2019")) ylabel(0.2(0.2)1) xlabel(1(1)10) title("Estonia") ytitle("Euroscepticism")
graph save Estonia_new2
*19. Hungary
twoway (qfitci Euroscepticism lr_scale if country==19 & Year>=2001 & Year<=2010 [pweight=weight]) ///
(qfitci Euroscepticism lr_scale if country==19 & Year>=2011 [pweight=weight]), legend(order(2 "2001-2010" 3 "2011-2019")) ylabel(0.2(0.2)1) xlabel(1(1)10) title("Hungary") ytitle("Euroscepticism")
graph save Hungary_new2
*20. Latvia
twoway (qfitci Euroscepticism lr_scale if country==20 & Year>=2001 & Year<=2010 [pweight=weight]) ///
(qfitci Euroscepticism lr_scale if country==20 & Year>=2011 [pweight=weight]), legend(order(2 "2001-2010" 3 "2011-2019")) ylabel(0.2(0.2)1) xlabel(1(1)10) title("Latvia") ytitle("Euroscepticism")
graph save Latvia_new2
*21. Lithuania
twoway (qfitci Euroscepticism lr_scale if country==21 & Year>=2001 & Year<=2010 [pweight=weight]) ///
(qfitci Euroscepticism lr_scale if country==21 & Year>=2011 [pweight=weight]), legend(order(2 "2001-2010" 3 "2011-2019")) ylabel(0.2(0.2)1) xlabel(1(1)10) title("Lithuania") ytitle("Euroscepticism")
graph save Lithuania_new2
*23. Poland
twoway (qfitci Euroscepticism lr_scale if country==23 & Year>=2001 & Year<=2010 [pweight=weight]) ///
(qfitci Euroscepticism lr_scale if country==23 & Year>=2011 [pweight=weight]), legend(order(2 "2001-2010" 3 "2011-2019")) ylabel(0.2(0.2)1) xlabel(1(1)10) title("Poland") ytitle("Euroscepticism")
graph save Poland_new2
*24. Slovakia
twoway (qfitci Euroscepticism lr_scale if country==24 & Year>=2001 & Year<=2010 [pweight=weight]) ///
(qfitci Euroscepticism lr_scale if country==24 & Year>=2011 [pweight=weight]), legend(order(2 "2001-2010" 3 "2011-2019")) ylabel(0.2(0.2)1) xlabel(1(1)10) title("Slovakia") ytitle("Euroscepticism")
graph save Slovakia_new2
*25. Slovenia
twoway (qfitci Euroscepticism lr_scale if country==25 & Year>=2001 & Year<=2010 [pweight=weight]) ///
(qfitci Euroscepticism lr_scale if country==25 & Year>=2011 [pweight=weight]), legend(order(2 "2001-2010" 3 "2011-2019")) ylabel(0.2(0.2)1) xlabel(1(1)10) title("Slovenia") ytitle("Euroscepticism")
graph save Slovenia_new2
*26. Bulgaria
twoway (qfitci Euroscepticism lr_scale if country==26 & Year>=2001 & Year<=2010 [pweight=weight]) ///
(qfitci Euroscepticism lr_scale if country==26 & Year>=2011 [pweight=weight]), legend(order(2 "2001-2010" 3 "2011-2019")) ylabel(0.2(0.2)1) xlabel(1(1)10) title("Slovenia") ytitle("Euroscepticism")
graph save Bulgaria_new2
*27. Romania
twoway (qfitci Euroscepticism lr_scale if country==27 & Year>=2001 & Year<=2010 [pweight=weight]) ///
(qfitci Euroscepticism lr_scale if country==27 & Year>=2011 [pweight=weight]), legend(order(2 "2001-2010" 3 "2011-2019")) ylabel(0.2(0.2)1) xlabel(1(1)10) title("Slovenia") ytitle("Euroscepticism")
graph save Romania_new2
*26. Croatia
twoway (qfitci Euroscepticism lr_scale if country==28 & Year>=2001 & Year<=2010 [pweight=weight]) ///
(qfitci Euroscepticism lr_scale if country==28 & Year>=2011 [pweight=weight]), legend(order(2 "2001-2010" 3 "2011-2019")) ylabel(0.2(0.2)1) xlabel(1(1)10) title("Slovenia") ytitle("Euroscepticism")
graph save Croatia_new2

*************************************************************************
************************** TABLES - APPENDIX A **************************
*************************************************************************
*Continental conservative
logit Euroscepticism c.lr_scale##c.lr_scale Year demo_female demo_age demo_education_cat3 demo_commtype [pweight=weight] if Welfare_Model==1 & Year>=1973 & Year<=1982
logit Euroscepticism c.lr_scale##c.lr_scale Year demo_female demo_age demo_education_cat3 demo_commtype [pweight=weight] if Welfare_Model==1 & Year>=1983 & Year<=1991
logit Euroscepticism c.lr_scale##c.lr_scale Year demo_female demo_age demo_education_cat3 demo_commtype [pweight=weight] if Welfare_Model==1 & Year>=1992 & Year<=2000
logit Euroscepticism c.lr_scale##c.lr_scale Year demo_female demo_age demo_education_cat3 demo_commtype [pweight=weight] if Welfare_Model==1 & Year>=2001 & Year<=2010
logit Euroscepticism c.lr_scale##c.lr_scale Year demo_female demo_age demo_education_cat3 demo_commtype [pweight=weight] if Welfare_Model==1 & Year>=2011 & Year<=2019
*Anglo-Saxon
logit Euroscepticism c.lr_scale##c.lr_scale Year demo_female demo_age demo_education_cat3 demo_commtype [pweight=weight] if Welfare_Model==2 & Year>=1973 & Year<=1982
logit Euroscepticism c.lr_scale##c.lr_scale Year demo_female demo_age demo_education_cat3 demo_commtype [pweight=weight] if Welfare_Model==2 & Year>=1983 & Year<=1991
logit Euroscepticism c.lr_scale##c.lr_scale Year demo_female demo_age demo_education_cat3 demo_commtype [pweight=weight] if Welfare_Model==2 & Year>=1992 & Year<=2000
logit Euroscepticism c.lr_scale##c.lr_scale Year demo_female demo_age demo_education_cat3 demo_commtype [pweight=weight] if Welfare_Model==2 & Year>=2001 & Year<=2010
logit Euroscepticism c.lr_scale##c.lr_scale Year demo_female demo_age demo_education_cat3 demo_commtype [pweight=weight] if Welfare_Model==2 & Year>=2011 & Year<=2019
*Mediterranean
logit Euroscepticism c.lr_scale##c.lr_scale Year demo_female demo_age demo_education_cat3 demo_commtype [pweight=weight] if Welfare_Model==3 & Year>=1986 & Year<=1991
logit Euroscepticism c.lr_scale##c.lr_scale Year demo_female demo_age demo_education_cat3 demo_commtype [pweight=weight] if Welfare_Model==3 & Year>=1992 & Year<=2000
logit Euroscepticism c.lr_scale##c.lr_scale Year demo_female demo_age demo_education_cat3 demo_commtype [pweight=weight] if Welfare_Model==3 & Year>=2001 & Year<=2010
logit Euroscepticism c.lr_scale##c.lr_scale Year demo_female demo_age demo_education_cat3 demo_commtype [pweight=weight] if Welfare_Model==3 & Year>=2011 & Year<=2019
*Nordic
logit Euroscepticism c.lr_scale##c.lr_scale Year demo_female demo_age demo_education_cat3 demo_commtype [pweight=weight] if Welfare_Model==4 & Year>=1995 & Year<=2000
logit Euroscepticism c.lr_scale##c.lr_scale Year demo_female demo_age demo_education_cat3 demo_commtype [pweight=weight] if Welfare_Model==4 & Year>=2001 & Year<=2010
logit Euroscepticism c.lr_scale##c.lr_scale Year demo_female demo_age demo_education_cat3 demo_commtype [pweight=weight] if Welfare_Model==4 & Year>=2011 & Year<=2019
*Eastern Post-socialist
logit Euroscepticism c.lr_scale##c.lr_scale Year demo_female demo_age demo_education_cat3 demo_commtype [pweight=weight] if Welfare_Model==5 & Year>=2004 & Year<=2010
logit Euroscepticism c.lr_scale##c.lr_scale Year demo_female demo_age demo_education_cat3 demo_commtype [pweight=weight] if Welfare_Model==5 & Year>=2011 & Year<=2019




